package com.waya.string;

public class StringDemo2 {
    public static void main(String[] args) {
        String s = "helloword";
        char[] chars = s.toCharArray();
        System.out.println(chars);
        byte[] bytes = s.getBytes();
        System.out.println(bytes[0]);
        for (int i = 0; i < bytes.length; i++) {
            System.out.println(bytes[i]);
        }
        String str = "today is sunshine ,fuck!";
        String str2 = str.replace("fuck","good");
        System.out.println(str2);
    }
}
